package com.jt.www.dao.mapper.issue;

import com.jt.www.dao.BaseMapper;
import com.jt.www.model.issue.ElectronicPolicyLogEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @ClassName EPolicyLogMapper
 * @Description
 * @Author yanglichao
 * @Date 2019/6/25
 * @Version 1.0
 **/
@Repository
public interface EPolicyLogMapper extends BaseMapper<ElectronicPolicyLogEntity> {
    /**
     * 插入请求
     *
     * @param entity
     */
    void insertRequest(ElectronicPolicyLogEntity entity);

    /**
     * 更新文件下载状态
     *
     * @param status
     * @param fileId
     * @param date
     */
    void updateRequest(@Param("applicationFormCode") String applicationFormCode, @Param("times") Integer times, @Param("status") String status, @Param("fileId") String fileId, @Param("date") Date date);


    /**
     * 更新文件下载状态，调用次数加1
     *
     * @param status
     * @param fileId
     * @param date
     */
    void updateRequestTimes(@Param("applicationFormCode") String applicationFormCode, @Param("times") Integer times, @Param("status") String status, @Param("fileId") String fileId, @Param("date") Date date);


    /**
     * 查询入参
     *
     * @param applicationFormCode
     * @return
     */
    String queryParam(String applicationFormCode);
}
